<?php
/**
 * User: b179a9
 * Date: 10/10/11
 * Time: 6:04 PM
 */

namespace Managers;

class MoneyOrders extends BaseManager
{

    const TABLE = '\Catalog\MoneyOrders';

    public function getList($filters = array())
    {
        $qb = $this->_em->createQueryBuilder()
                ->select('mo')
                ->from(self::TABLE, 'mo');

        if (array_key_exists('user', $filters) && !empty($filters['user'])) {
            $qb->andWhere('mo.user = :user')
                    ->setParameter('user', $filters['user']);
        }

        $res = $qb->getQuery()
                ->getArrayResult();
        return $res;
    }

}
